package com.stylefeng.guns;


import net.minidev.json.JSONArray;

import org.json.JSONObject;
import org.springframework.dao.DataAccessException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.SQLException;
import java.util.*;

public class T2 {
    public static void main(String[] args) throws Exception {
        JSONObject object = new JSONObject();
        object.put("1","2");
        Object jsonObject = object.get("1");
        String name = jsonObject.getClass().getName();
        System.out.println(name);
        //tankCreateBar();
    }


    /**
     * 储罐信息查询统计柱状图
     *
     * @throws SQLException
     * @throws DataAccessException
     * @author fx
     */
    public static void  tankCreateBar() throws Exception {
        // TODO Auto-generated method stub

        JSONObject totaljson = new JSONObject();//所有数据
        JSONObject map1 = new JSONObject();

        Map<String, String> map2 = new HashMap<String, String>();//["上海宝山"：[0]]
        map2.put("1","2");
        JSONObject jsonObject = new JSONObject();
        totaljson.put("map", totaljson);


        JSONArray jsonMap = new JSONArray();
        jsonMap.add("1");
        jsonMap.add("2");
        jsonMap.add("3");
        totaljson.put("arr", jsonMap);
        JSONObject series = new JSONObject();

        JSONObject orgAndVolume = new JSONObject();//所有数据
        String orgCode = "";
        String type="";

        Object o = totaljson.get(type);


        orgAndVolume = totaljson.getJSONObject("arr");



    }
}